/**
*	@name							Boilerplate
*	@descripton						A Jquery Plugin Development Boilerplate
*	@version						1.0
*	@requires						Jquery 1.3.2
*
*	@author							Jan Jarfalk
*	@author-email					jan.jarfalk@unwrongest.com
*	@author-twitter					janjarfalk
*	@author-website					http://www.unwrongest.com
*
*	@licens							MIT License - http://www.opensource.org/licenses/mit-license.php
*
*	@param {Object} o				Plugin options
*	@param {Function} c				Callback function
*/

(function(jQuery){
     jQuery.fn.extend({
         boilerplate: function( o, c ) {
			
			// Setup callback object
			var callback 	= {'fn':null,'args':{}}
				callback.fn = (typeof o === 'function') ? o : c;
			
			// Setup option object	
			var options		= (typeof o === 'function' || typeof o === 'undefined') ? {} : o;
			
			// Setup settings object using passed in options and default options
			var settings = jQuery.extend({
     			setting: options.setting || null
  			}, options);
			
			// Iterate over elements
            return this.each(function( index, element ) {
				
				var $element				=	$(this);
					callback.args.element 	=	$element;
					
				// Plugin code goes here...
				
				
				// Fire callback if there is a callback
				if( callback.fn ){
					callback.fn( callback.args );
				}	
				
            });
        }
    });
})(jQuery);